<%--
  Created by IntelliJ IDEA.
  User: shen
  Date: 2020/3/13
  Time: 23:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <base href="${basePath}"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>查看未处理反馈</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <%@include file="../common_resource.jsp" %>
    <style type="text/css">
        .msg{
            color: red;
            font-style: italic;
            font-weight: normal;
        }
        .listData_btn{
            font-size: 11px;
            margin:0px;
        }
    </style>
    <style>
        .main_body{
            font-size: 15px;
        }
    </style>

</head>

<body class="main_body">
<div class="container container-1180" >
    <div class="col" style="margin-top: 10px;">
        <div class="panel panel-info">
            <div class="panel-heading">
                <span ><i class="fa fa-user"></i></span> <label><font style="font-weight: bold;margin-left: 10px;font-size: 17px">反&nbsp;馈&nbsp;信&nbsp;息</font></label>
            </div>
            <div class="panel panel-warning" style="margin-top: -40px;margin: 10px">
                <div class="panel-heading">
                    <h3 class="panel-title"><span class="glyphicon glyphicon-th-list"></span>&nbsp;已处理反馈信息</h3>
                </div>
                <div class="panel-body">
                    <table class="table table-hover" style="margin-left:190px; font-size: 16px;width: 680px; text-align: center;">
                        <tr style="height: 25px; font-weight: bold;" class="success">
                            <th align="center" width="60px" style="text-align: center;">序号</th>
                            <th align="center" style="text-align: center;">反馈标题</th>
                            <th align="center" style="text-align: center;">反馈内容</th>
                            <th align="center" style="text-align: center;">反馈状态</th>
                            <th align="center" style="text-align: center;">反馈学生名</th>
                        </tr>

                        <c:forEach var="sstsFeedbackDeal" items="${sstsFeedbackDealByIdList}" varStatus="status" >

                            <tr id="row${sstsFeedbackDeal.sstsFeedbackID}">
                                <td align="center">${status.count}</td>
                                <td>
                                    <span id="name${sstsFeedbackDeal.sstsFeedbackID }" style="display: block;">${sstsFeedbackDeal.feedbackTitle}</span>
                                    <div id="update${sstsFeedbackDeal.sstsFeedbackID }" style="display: none">
                                    </div>
                                </td>
                                <td>
                                    <span id="name${sstsFeedbackDeal.sstsFeedbackID }" style="display: block;">${sstsFeedbackDeal.feedbackContent}</span>
                                </td>
                                <td>
                                    <span id="name${sstsFeedbackDeal.sstsFeedbackID }" style="display: block;">已处理</span>
                                </td>
                                <td>
                                    <span id="name${sstsFeedbackDeal.sstsFeedbackID }" style="display: block;">${sstsFeedbackDeal.sstsUsers.username}</span>
                                </td>
                            </tr>
                        </c:forEach>

                    </table>
                    <div class="pager" style="padding-left:50px;background-color: #FAEBD7">
                        <%--分页显示--%>
                        总${sstsFeedbackDealByIdList.size()}条 &nbsp;&nbsp; 第${sstsFeedbackDealByIdList.getPageNum()}页/共${sstsFeedbackDealByIdList.getPages()}页
                        &nbsp;&nbsp; &nbsp;&nbsp;
                        <c:if test="${sstsFeedbackDealByIdList.getPageNum() gt 1}">
                            <a href="feedback/selectAllDeal/${sessionScope.loginUser.sstsUserID}/0/1">第一页</a> &nbsp;
                        </c:if>
                        <c:if test="${sstsFeedbackDealByIdList.getPageNum() gt 1}">
                            <a href="feedback/selectAllDeal/${sessionScope.loginUser.sstsUserID}/0/${sstsFeedbackDealByIdList.getPageNum()-1}">上一页</a>&nbsp;
                        </c:if>
                        <c:if test="${sstsFeedbackDealByIdList.getPageNum() lt sstsFeedbackDealByIdList.getPages()}">
                            <a href="feedback/selectAllDeal/${sessionScope.loginUser.sstsUserID}/0/${sstsFeedbackDealByIdList.getPageNum()+1}">下一页</a>&nbsp;
                        </c:if>
                        <c:if test="${sstsFeedbackDealByIdList.getPageNum() lt sstsFeedbackDealByIdList.getPages()}">
                            <a href="feedback/selectAllDeal/${sessionScope.loginUser.sstsUserID}/0/${sstsFeedbackDealByIdList.getPages()}">末页</a>&nbsp;
                        </c:if>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- Mainly scripts -->
<script src="bootstrap/js/bootstrap.min.js"></script>

<script src="bootstrap/plugins/transition.js"></script>
<script src="bootstrap/plugins/modal.js"></script>
<script src="bootstrap/plugins/tooltip.js"></script>
<script src="bootstrap/plugins/popover.js"></script>
<script src="bootstrap/plugins/collapse.js"></script>
<script src="bootstrap/js/jquery.editable-select.min.js"></script>
<script src="js/jquery-2.0.0.js"></script>
<script src="bootstrap/js/bootstrap.js"></script>
<!-- Mainly scripts -->
<script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

<!-- Custom and plugin javascript -->
<script src="js/inspinia.js"></script>
<script src="js/plugins/pace/pace.min.js"></script>

<!-- Sweet alert -->
<script src="js/plugins/sweetalert/sweetalert.min.js"></script>

<!-- 更新失败modal -->
<div class="modal fade" id="failModal" tabindex="-1" role="dialog"
     aria-labelledby="feildModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-hidden="true">×
                </button>
                <h2 class="modal-title" id="myModal4">
                    <i class="fa fa-twitch"></i> &nbsp;&nbsp;提示
                </h2>
            </div>
            <div class="modal-body" style="text-align:center;">
                处理反馈失败
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default"
                        data-dismiss="modal">关闭
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<script>
    /*实际确认进行更新*/
    function doUpdate(id){
        var value=$("#button"+id).val();
        $.post("feedback/updateNotFeedback/1",{"sstsFeedbackID":id},function(date){
            if(date.updateNotFeedback==1){
                $('#row'+id).remove();
            }else{
                $("#failModal").modal();
            }
        });
    }
</script>
</body>
</html>
